home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / s-powtab.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  80 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                  S Y S T E M . P O W T E N _ T A B L E                   --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.3 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- The GNAT library is free software; you can redistribute it and/or modify --
  14. -- it under terms of the GNU Library General Public License as published by --
  15. -- the Free Software  Foundation; either version 2, or (at your option) any --
  16. -- later version.  The GNAT library is distributed in the hope that it will --
  17. -- be useful, but WITHOUT ANY WARRANTY;  without even  the implied warranty --
  18. -- of MERCHANTABILITY  or  FITNESS FOR  A PARTICULAR PURPOSE.  See the  GNU --
  19. -- Library  General  Public  License for  more  details.  You  should  have --
  20. -- received  a copy of the GNU  Library  General Public License  along with --
  21. -- the GNAT library;  see the file  COPYING.LIB.  If not, write to the Free --
  22. -- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.        --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. --  This package provides a powers of ten table used for real conversions
  27.  
  28. package System.Powten_Table is
  29. pragma Pure (Powten_Table);
  30.  
  31.    --  The number of entries in this table is chosen to be large enough to
  32.    --  correspond to the number of decimal digits in a 128-bit integer. It
  33.    --  seems unlikely that Long_Long_Integer will have more than 128-bits
  34.    --  for some time to come!
  35.  
  36.    Powten : constant array (0 .. 40) of Long_Long_Float :=
  37.       (00 => 1.0E+00,
  38.        01 => 1.0E+01,
  39.        02 => 1.0E+02,
  40.        03 => 1.0E+03,
  41.        04 => 1.0E+04,
  42.        05 => 1.0E+05,
  43.        06 => 1.0E+06,
  44.        07 => 1.0E+07,
  45.        08 => 1.0E+08,
  46.        09 => 1.0E+09,
  47.        10 => 1.0E+10,
  48.        11 => 1.0E+11,
  49.        12 => 1.0E+12,
  50.        13 => 1.0E+13,
  51.        14 => 1.0E+14,
  52.        15 => 1.0E+15,
  53.        16 => 1.0E+16,
  54.        17 => 1.0E+17,
  55.        18 => 1.0E+18,
  56.        19 => 1.0E+19,
  57.        20 => 1.0E+20,
  58.        21 => 1.0E+21,
  59.        22 => 1.0E+22,
  60.        23 => 1.0E+23,
  61.        24 => 1.0E+24,
  62.        25 => 1.0E+25,
  63.        26 => 1.0E+26,
  64.        27 => 1.0E+27,
  65.        28 => 1.0E+28,
  66.        29 => 1.0E+29,
  67.        30 => 1.0E+30,
  68.        31 => 1.0E+31,
  69.        32 => 1.0E+32,
  70.        33 => 1.0E+33,
  71.        34 => 1.0E+34,
  72.        35 => 1.0E+35,
  73.        36 => 1.0E+36,
  74.        37 => 1.0E+37,
  75.        38 => 1.0E+38,
  76.        39 => 1.0E+39,
  77.        40 => 1.0E+40);
  78.  
  79. end System.Powten_Table;
  80.